<?php
	require_once("View/MemberView.php");
	require_once("Model/MemberCatalogModel.php");
	require_once("View/NavigationView.php");
	
	class AddMemberController
	{
		public function DoControll(Database $db)
		{
			$mm = new MemberCatalogModel($db);
			$mv = new MemberView();
			
			$html = $mv->RenderCreateMember();
			
			if($mv->TriedToCreate() == true)
			{
				$mm->AddMember($mv->GetFirstName(), $mv->GetLastName(), $mv->GetSocialNumber());
			}
			
			return $html;
		}
			
	}

?>